<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>{$title}</title
><link href="{MODULE_URL}images/css/owl.carousel.css" rel="stylesheet">
<link href="{MODULE_URL}images/css/public.css" rel="stylesheet" type="text/css" />
<link href="{MODULE_URL}images/css/index.css" rel="stylesheet" type="text/css" />
<link href="{MODULE_URL}images/weui.css" rel="stylesheet" type="text/css" />
<link href="{MODULE_URL}images/weui2.css" rel="stylesheet" type="text/css" />
<link href="{MODULE_URL}images/mui.min.css" rel="stylesheet" type="text/css" />
<script src="{MODULE_URL}images/js/jquery-1.8.3.min.js"></script>

<script src="{MODULE_URL}images/zepto.min.js"></script>
</head>
<style>
  .weui_dialog, .weui_toast{top:10%;}
</style>
<body>

<div class="mobile">

<form data-role="form" action="./index.php" method="get" class="index-search ">
 <input type="hidden" name="i" value="{$_W['uniacid']}">
    <input type="hidden" name="c" value="{$_GPC['c']}">   
    <input type="hidden" name="do" value="list">
    <input type="hidden" name="m" value="{$_GPC['m']}">
<div class="input-wrapper">
<input type="text" placeholder="搜索商家、分类、地点" autocomplete="off" data-role="input" maxlength="20" name="keyword" class="input">
<i data-role="clear" class="clear"></i>
<input data-role="submit" type="submit" class="submit">
</div>
</form>  
<ul class="mui-table-view">
<li style="background: #313F46;color: #FFF!important;" class="mui-table-view-cell">
<a data-loading="1" href="{php echo $this->createMobileUrl('Mybusiness', array('op'=>'weixin'));}">
限时 <b id="free-flash" style="color: red;">免费</b> 加入本土人脉圈
<button id="free-btn" class="mui-btn mui-pull-right mui-btn-blue">点此加入</button>
</a>
</li>
</ul>
  <div class="weui_tab weui_tab_red"  style="height:55px;">
            <div class="weui_navbar">
             {loop $cate $key $category}
               <a class="weui_navbar_item  {if $key == $op}tab-red {/if}" href="{php echo $this->createMobileurl('renmai', array('op'=>$key));}">
                  {$category}
                </a>
               {/loop}               
            </div>
        </div>
 
  <div class="m_baoliao w" style="padding-bottom: 55px">    
    <div class="baoliao_list" style="width:100%" id="qq">
    {loop $business  $business}  
   
              <section class="good">
                  <a  href="javascript:;" id="{$business['id']}" class="good-content">
                  <div class="img-wrapper">
                  <div class="img-placeholder">
                  <img width="120" height="72" data-role="deal-img" src="{php echo tomedia($business['ewm'])}" style="visibility: visible;">
                  </div>
                  <span class="tag reservation"></span>                  
                  </div>
                  <div class="info-wrapper">
                  <div class="title-line ">
                  <div class="title" style="font-size: 14px;color:#000">
                  {$business['title']}{$business['nickname']}</div>
                  <span class="distance"></span>
                  <span class="store">{php echo $this->friendlyDate($business['time'])} </span>
                  </div>
                  <p class="desc">{$business['yjh']}</p>
                  <p class="price-line">
                  <ins style="font-size:14px">点击加他</ins> 
                  <span class="bought">已看{$business['click']}次</span>
                  </p>
                  </div>
                  </a>
                  <script>
                    $(document).on("click", "#{$business['id']}", function() {
$.alert("<img src='{php echo tomedia($business['ewm'])}'><br>1、长按识别二维码，或添加微信：{$business['weixin']}<br>2、添加时请注明来自：{$_W['uniaccount']['name']}", "老板微信添加");
                        });
                  </script>
        </section>
    {/loop}

    </div>
    
  </div>
 {template 'footer'}

</div>
<div class="gotop backtop" style="display:none;"></div>
<script>
$(function () {
var stop = true;

var flashId = 0;
setInterval(function(){
if(flashId++ == 1) {
flashId = 0;
$('#free-flash').css({color: 'white'});
$('#free-btn').addClass('mui-btn-green').removeClass('mui-btn-blue');
}else{
$('#free-flash').css({color: 'red'});
$('#free-btn').removeClass('mui-btn-green').addClass('mui-btn-blue');
}
}, 500);

});
</script>
 <script src="{MODULE_URL}images/refresh.js"></script> 
 <script>

$(window).refresh({
  contentEl: '#qq',
  // 头部的高度
  distanceToRefresh: 40,
  // 开启刷新
  isRefresh: true,
  // 开启加载更多
  isLoadingMore: true,
  // 触发刷新回调
  refreshCallback: function(complete) {
     setTimeout(function() {
      window.location.reload();
      complete();
     }, 1000)
  },
  // 加载更多回调
  loadingMoreCallback: function(complete) {
    var tpl = '';

    for (var i = 0; i < 10; i++) {

      tpl += '<div class="weui_media_box weui_media_text"><p class="weui_media_desc">'+(i+14) +'我爱你星球有一定的形状，有自己的运行轨道。</p></div>';
    }

    $('#qq').append(tpl);
    complete('finish');

  }
}); 
</script>
</body>
</html>
